DescribeMetricRuleList
Description
call the DescribeMetricRuleList interface to query the alarm rule list.
Request Method
POST
Request Path
/apsara/route/cms/DescribeMetricRuleList
Request Parameters Common Parameters
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
PageSize | BODY | string | No | 10 | The number of records displayed per page is 10 by default. |
Dimensions | BODY | string | No | {"instanceId":"i-xy123****"} | dimension map, which is used to query the monitoring data of specified resources. format key-value a collection of key-value pairs, commonly used key-value set as instanceId:XXXXXX. key and value has a length of 1~64 bytes, intercept the first 64 bytes when it exceeds 64 bytes. key and value can include letters, numbers, half-width periods (.), dashes (-), underscores (_), forward slashes (/), and backslashes (\). description Dimensions when passing in, a JSON string must be used to represent the Map object and must be passed in sequentially. |
Page | BODY | string | No | 1 | page number, the default is 1. |
version | BODY | string | No | 2016-01-01 | version of api |
Namespace | BODY | string | No | acs_ecs_dashboard | the data namespace of the product. description for details, please refer to cloud product main monitoring items |
AlertState | BODY | string | No | ALARM | alarm rule status. Value: OK: normal ALARM: Alarm INSUFFICIENT_DATA: no data |
GroupId | BODY | string | No | 123456 | application group ID. |
MetricName | BODY | string | No | cpu_total | monitoring item name. description for details, please refer to main monitoring items of cloud products . |
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
EnableState | BODY | boolean | No | true | enabled state. Value: true: enable false: disable is empty by default, that is, rules for all states (including enable and disable). |
RuleIds | BODY | string | No | a151cd6023eacee2f0978e03863cc1697c8950812**** | alarm rule ID. description this parameter supports multiple queries at a time, and multiple IDs are separated by commas (,), with a maximum of 20 queries at a time. |
RuleName | BODY | string | No | ECSCPU alarm rules | alarm rule name. Description This parameter supports fuzzy queries. |
Return data
Name | Type | Sample value | Description |
---|---|---|---|
GroupName | string | No sample value for this parameter. | application group name. Description If the alarm rule is associated with an application group, this parameter is displayed here. |
NoEffectiveInterval | string | No sample value for this parameter. | The alarm rule does not take effect. |
ComparisonOperator | string | No sample value for this parameter. | Warn level threshold comparator, optional values are as follows: GreaterThanOrEqualToThreshold: greater than or equal to GreaterThanThreshold: greater than LessThanOrEqualToThreshold: less than or equal to LessThanThreshold: less than NotEqualToThreshold: unequal GreaterThanYesterday: year-on-year increase yesterday LessThanYesterday: down from yesterday GreaterThanLastWeek: year-on-year increase at the same time last week LessThanLastWeek: year-on-year decrease at the same time last week GreaterThanLastPeriod: month-on-month increase LessThanLastPeriod: month-on-month decline |
MailSubject | string | No sample value for this parameter. | alarm email subject definition. |
Message | string | No sample value for this parameter. | error message. |
RuleId | string | No sample value for this parameter. | alarm rule ID. |
SourceType | string | No sample value for this parameter. | alarm rule type METRIC: time series indicator alarm rules EVENT: old version of event type alarm rules (obsolete) |
Critical | none | No sample value for this parameter. | Critical level alarm trigger condition. |
Success | boolean | No sample value for this parameter. | whether the request was successful. |
Warn | none | No sample value for this parameter. | Warn level alarm trigger condition. |
MetricName | string | No sample value for this parameter. | monitoring item name. |
RuleName | string | No sample value for this parameter. | alarm rule name. |
Threshold | string | No sample value for this parameter. | Warn level threshold. |
ContactGroups | string | No sample value for this parameter. | alarm contact. |
SilenceTime | string | No sample value for this parameter. | channel silence period, in seconds. The default value is 86400 seconds (1 day) and the shortest is 3600 seconds (1 hour). When the monitoring data continuously exceeds the alarm rule threshold, only one alarm notification is sent in each silence period. |
RequestId | string | No sample value for this parameter. | request ID. |
Alarms | array | No sample value for this parameter. | alarm rule list. |
Dimensions | string | No sample value for this parameter. | dimension map, which is used to query the monitoring data of specified resources. format key-value a collection of key-value pairs, commonly used key-value set as instanceId:XXXXXX. key and value has a length of 1~64 bytes, intercept the first 64 bytes when it exceeds 64 bytes. key and value can include letters, numbers, half-width periods (.), dashes (-), underscores (_), forward slashes (/), and backslashes (\). description Dimensions when passing in, a JSON string must be used to represent the Map object and must be passed in sequentially. |
Period | string | No sample value for this parameter. | statistical period. |
EffectiveInterval | string | No sample value for this parameter. | the effective time period of the alarm rule. |
Info | none | No sample value for this parameter. | Info level alarm trigger condition. |
Code | integer | No sample value for this parameter. | status code. description status code 200 indicates success. |
Statistics | string | No sample value for this parameter. | Warn level alarm statistics method. |
AlertState | string | No sample value for this parameter. | alarm rule status. Value: OK: normal ALARM: Alarm INSUFFICIENT_DATA: no data |
Namespace | string | No sample value for this parameter. | The data namespace of the product is used to distinguish different products. |
GroupId | string | No sample value for this parameter. | application group ID. |
Total | string | No sample value for this parameter. | total number of records. |
Alarm | none | No sample value for this parameter. | alarm rule list. |
Times | string | No sample value for this parameter. | Warn level continuous occurrence times, the alarm will be triggered only if the number of consecutive occurrences exceeds the threshold. |
EnableState | boolean | No sample value for this parameter. | enabled state. Value: true: enable false: disable is empty by default, that is, rules for all states (including enable and disable). |
Escalations | none | No sample value for this parameter. | alarm level trigger condition. |
Webhook | string | No sample value for this parameter. | URL callback address. |
Resources | string | No sample value for this parameter. | resources associated with alarm rules. |
Example
Successful Response example
"The successful response sample is not recognizable. Please modify API definition in API gateway before re-create the API document."
Failed Response example
{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}
}